home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / include / DShowIDL / Videoacc.idl < prev    next >
Text File  |  2001-10-08  |  8KB  |  173 lines

  1. //------------------------------------------------------------------------------
  2. // File: VideoAcc.idl
  3. //
  4. // Desc: An interface exposed by the overlay mixer to help decode samples
  5. //       using hardware video acceleration.
  6. //
  7. // Copyright (c) 1992-2001, Microsoft Corporation.  All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10.  
  11. import "unknwn.idl";
  12.  
  13. cpp_quote("//")
  14. cpp_quote("//   The following declarations within the 'if 0' block are dummy typedefs used to make")
  15. cpp_quote("//   the motncomp.idl file build.  The actual definitions are contained in ddraw.h and amva.h")
  16. cpp_quote("//")
  17. cpp_quote("#if 0")
  18.  
  19. typedef void*       LPVOID;
  20. typedef void*       LPGUID;
  21. typedef void*       LPDIRECTDRAWSURFACE;
  22. typedef void*       LPDDPIXELFORMAT;
  23. typedef void*       LPAMVAInternalMemInfo;
  24. typedef void        AMVAUncompDataInfo;
  25. typedef void*       LPAMVACompBufferInfo;
  26. typedef void        AMVABUFFERINFO;
  27. typedef void        AMVAEndFrameInfo;
  28. typedef void*       LPAMVAUncompBufferInfo;
  29. typedef void        AMVABeginFrameInfo;
  30. typedef IUnknown*   IMediaSample;
  31.  
  32. cpp_quote("#endif")
  33. cpp_quote("#include <ddraw.h>")
  34. cpp_quote("#include <amva.h>")
  35.  
  36.  
  37. [
  38.     local,
  39.     object,
  40.     uuid(256A6A21-FBAD-11d1-82BF-00A0C9696C8F),
  41.     helpstring("IAMVideoAcceleratorNotify Interface"),
  42.     pointer_default(unique)
  43. ]
  44.  
  45. // IAMVideoAcceleratorNotify
  46. interface IAMVideoAcceleratorNotify : IUnknown
  47. {
  48.     // get information necessary to allocate uncompressed data buffers
  49.     // which is not part of the mediatype format (like how many buffers to allocate etc)
  50.     HRESULT GetUncompSurfacesInfo([in] const GUID *pGuid, [in] [out] LPAMVAUncompBufferInfo pUncompBufferInfo);
  51.  
  52.     // set information regarding allocated uncompressed data buffers
  53.     HRESULT SetUncompSurfacesInfo([in] DWORD dwActualUncompSurfacesAllocated);
  54.  
  55.     // get information necessary to create video accelerator object. It is the caller's responsibility
  56.     // to call CoTaskMemFree() on *ppMiscData
  57.     HRESULT GetCreateVideoAcceleratorData([in] const GUID *pGuid, [out] LPDWORD pdwSizeMiscData, [out] LPVOID *ppMiscData);
  58. };
  59.  
  60. [
  61.     local,
  62.     object,
  63.     uuid(256A6A22-FBAD-11d1-82BF-00A0C9696C8F),
  64.     helpstring("IAMVideoAccelerator Interface"),
  65.     pointer_default(unique)
  66. ]
  67.  
  68. // IAMVideoAccelerator
  69. interface IAMVideoAccelerator : IUnknown
  70. {
  71.     // pdwNumGuidsSupported is an IN OUT paramter
  72.     // pGuidsSupported is an IN OUT paramter
  73.     // if pGuidsSupported is NULL,  pdwNumGuidsSupported should return back with the
  74.     // number of uncompressed pixel formats supported
  75.     // Otherwise pGuidsSupported is an array of *pdwNumGuidsSupported structures
  76.     HRESULT GetVideoAcceleratorGUIDs([in] [out] LPDWORD pdwNumGuidsSupported, [in] [out] LPGUID pGuidsSupported);
  77.  
  78.     // pGuid is an IN parameter
  79.     // pdwNumFormatsSupported is an IN OUT paramter
  80.     // pFormatsSupported is an IN OUT paramter (caller should make sure to set the size of EACH struct)
  81.     // if pFormatsSupported is NULL,  pdwNumFormatsSupported should return back with
  82.     // the number of uncompressed pixel formats supported
  83.     // Otherwise pFormatsSupported is an array of *pdwNumFormatsSupported structures
  84.     HRESULT GetUncompFormatsSupported( [in] const GUID *pGuid, [in] [out] LPDWORD pdwNumFormatsSupported,
  85.         [in] [out] LPDDPIXELFORMAT pFormatsSupported);
  86.  
  87.     // pGuid is an IN parameter
  88.     // pamvaUncompDataInfo is an IN parameter
  89.     // pamvaInternalMemInfo is an IN OUT parameter (caller should make sure to set the size of struct)
  90.     // currently only gets info about how much scratch memory will the hal allocate for its private use
  91.     HRESULT GetInternalMemInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo,
  92.         [in] [out] LPAMVAInternalMemInfo pamvaInternalMemInfo);
  93.  
  94.     // pGuid is an IN parameter
  95.     // pamvaUncompDataInfo is an IN parameter
  96.     // pdwNumTypesCompBuffers is an IN OUT paramter
  97.     // pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct)
  98.     // if pamvaCompBufferInfo is NULL,  pdwNumTypesCompBuffers should return back with the number of types of
  99.     // compressed buffers
  100.     // Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures
  101.     HRESULT GetCompBufferInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo,
  102.         [in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo);
  103.  
  104.  
  105.     // pdwNumTypesCompBuffers is an IN OUT paramter
  106.     // pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct)
  107.     // if pamvaCompBufferInfo is NULL,  pdwNumTypesCompBuffers should return back with the number of types of
  108.     // compressed buffers
  109.     // Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures
  110.     // only valid to call this after the pins are connected
  111.     HRESULT GetInternalCompBufferInfo([in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo);
  112.  
  113.     // begin a frame, the pMiscData is passed directly to the hal
  114.     // only valid to call this after the pins are connected
  115.     // Tells the ovmixer which frame is the destination
  116.     // frame. Use indices (valid vales are [0 .. pdwNumSurfacesAllocated-1]) to specify frames
  117.     HRESULT BeginFrame([in] const AMVABeginFrameInfo *amvaBeginFrameInfo);
  118.  
  119.     // end a frame, the pMiscData is passed directly to the hal
  120.     // only valid to call this after the pins are connected
  121.     HRESULT EndFrame([in] const AMVAEndFrameInfo *pEndFrameInfo);
  122.  
  123.     // lock and obtain access to a single buffer
  124.     // only valid to call this after the pins are connected
  125.     // Buffers are identified by type and index within that type
  126.     // Specifiying read-only will allow access to busy reference
  127.     // frames
  128.     // Output (uncompressed) frames use a type index of 0xFFFFFFFF
  129.     HRESULT GetBuffer(
  130.         [in] DWORD dwTypeIndex,
  131.         [in] DWORD dwBufferIndex,
  132.         [in] BOOL bReadOnly,
  133.         [out] LPVOID *ppBuffer,
  134.         [out] LONG *lpStride);
  135.  
  136.     // unlock a single buffer
  137.     // Buffers are identified by type and index within that type
  138.     // only valid to call this after the pins are connected
  139.     HRESULT ReleaseBuffer([in] DWORD dwTypeIndex, [in] DWORD dwBufferIndex);
  140.  
  141.     // Perform a decompression operation
  142.     // Private data can be passed to and from a driver
  143.     // identifiers for the corresponding members of pamvaMacroBlockInfo
  144.     // pamvaMacroBlockInfo is an IN parameter which is array (of length dwNumBlocks) of structures
  145.     // only valid to call this after the pins are connected
  146.     HRESULT Execute(
  147.         [in] DWORD dwFunction,
  148.         [in] LPVOID lpPrivateInputData,
  149.         [in] DWORD cbPrivateInputData,
  150.         [in] LPVOID lpPrivateOutputDat,
  151.         [in] DWORD cbPrivateOutputData,
  152.         [in] DWORD dwNumBuffers,
  153.         [in] const AMVABUFFERINFO *pamvaBufferInfo);
  154.  
  155.     // query the decode status of a particular decompression operation
  156.     // dwTypeIndex and dwBufferIndex define the buffer whose status is
  157.     // being queried
  158.     HRESULT QueryRenderStatus([in] DWORD dwTypeIndex,
  159.                               [in] DWORD dwBufferIndex,
  160.                               [in] DWORD dwFlags);
  161.  
  162.     // display a frame. The mediasample contains the timestamps etc for the frame to be displayed
  163.     // this call is a non-blocking call
  164.     // only valid to call this after the pins are connected
  165.     HRESULT DisplayFrame([in] DWORD dwFlipToIndex, [in] IMediaSample *pMediaSample);
  166. };
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.